import java.util.Scanner;

class TestFor {
    public static void main(String[] args) {
        int firNum;             //第一个数
        int secNum;            //第二个数
        int maxNum;           //最大数
        //获取终端输入的数据，并利用 for 循环实现局部乘法表的打印输出
        
        Scanner sc = new Scanner(System.in);
        System.out.print("请输入一个整数：");
        maxNum = sc.nextInt();
        System.out.println("数" + maxNum + "的乘法表为：");
        for(firNum = 0; firNum <= maxNum; firNum++){
            secNum = maxNum - firNum;
            System.out.println(firNum + " * " + secNum + " = " + ( firNum * secNum ));
        }
    }
}